clear

 use "/Users/scottfabramson/Dropbox/Job Market Paper/IO Revisions/Replication_Files/Replication_Appendix/A_Table_5/data_table_a5.dta"


ssc install xtivreg2
ssc install ivreg2



tsset ID Year

tabulate Year, g(y)
generate instrument= abs(Temp-10.5)
generate treatment= log(Urban_Pop+.001)







***Column 1 ***

ivreg2 Entrants n_cities (treatment = instrument), cluster(ID) 



	*** Fstat ***
	
	ivreg2 Entrants n_cities (treatment = instrument), cluster(ID) ffirst
	
	
	
	
	
***Column 2 ***


ivreg2 Entrants n_cities X Y  (treatment = instrument), cluster(ID) 

	
	*** Fstat ***
	
	ivreg2 Entrants n_cities X Y  (treatment = instrument), cluster(ID) ffirst


***Column 3 ***


ivreg2 Entrants n_cities X Y y1 y2 y3 y4 y5 y6 (treatment = instrument), cluster(ID) 


	*** Fstat ***

	ivreg2 Entrants n_cities X Y y1 y2 y3 y4 y5 y6 (treatment = instrument), cluster(ID) ffirst


***Column 4 ***

xtivreg2 Entrants n_cities (treatment = instrument), fe cluster(ID)


	*** Fstat ***
	
	xtivreg2 Entrants n_cities (treatment = instrument), fe cluster(ID) ffirst



***Column 5 ***

xtivreg2 Entrants n_cities L.Entrants (treatment = instrument), fe cluster(ID)


	*** Fstat ***
	xtivreg2 Entrants n_cities L.Entrants (treatment = instrument), fe cluster(ID) ffirst


***Column 6 ***

xtivreg2 Entrants n_cities (treatment = instrument), fd cluster(ID)

	*** Fstat ***
	
	xtivreg2 Entrants n_cities (treatment = instrument), fd cluster(ID) ffirst



